<!DOCTYPE html>
<html>
    <head>
        <meta charset='utf-8' />
        <title>一列布局</title>
        <style>
            body{margin:0px;padding:0px;}
            #header{
                height:50px;
                background-color:royalblue;
            }
            #mainbody{
                width:1000px;
                height:400px;
                background-color:deeppink;
                margin:0 auto;
            }
            #footer{
                height:100px;
                width:1000px;
                background-color:red;
                margin:0px auto;
            }
        </style>
    </head>
    <body>
        <div id='header'></div>
        <div id='mainbody'></div>
        <div id='footer'></div>
    </body>
</html>